package com.pace.ribbon.day03;import org.springframework.context.annotation.Condition;import org.springframework.context.annotation.ConditionContext;import org.springframework.core.env.Environment;import org.springframework.core.type.AnnotatedTypeMetadata;/** * @Auther: sky * @Date: 2019/3/27 22:47 * @Description: */public class ConditionImpl implements Condition {    @Override    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {        Environment env = conditionContext.getEnvironment();        //需要创建Condition的实现并根据环境中是否存在magic属性来做出决策        return env.containsProperty("magic");//        return false;    }}